import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus' // 引入element-plus
import 'element-plus/dist/index.css' // 引入element-plus的css
import { createPinia } from 'pinia'; // 引入pinia
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'; // 引入pinia持久化插件
import router from './router'; // 引入路由配置
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


const app = createApp(App)

const pinia = createPinia();
pinia.use(piniaPluginPersistedstate); // 使用pinia持久化插件


app.use(ElementPlus) //注册elementplus为全局插件
app.use(router);
app.use(pinia);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.mount('#app')
